<template>
	<view class="padding-horizontal">
		<view class="padding-vertical-small font-bold">
			二维码内容
		</view>
		<u--textarea v-model="value1" placeholder="请输入内容" count ></u--textarea>
		<!-- <view @click="baocunerwmm" class="button-small" style="margin: 20rpx auto;">
			保存到本地
		</view> -->
		<view class="row-center">
			<uqrcode ref="uqrcode" canvas-id="qrcode" :auto='true' :value="value1" :options="{ margin: 10 }"></uqrcode>
		</view>
		<view  @click="baocunerwmm" style="margin: 100rpx auto;" class="button-small">
			保存到本地
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value1:'默认内容',
				isewmm:false
			}
		},
		methods: {
			ermm(){
				console.log('点击了');
				this.isewmm = false
				this.isewmm = true
			},
			baocunerwmm(){
				this.$refs.uqrcode.toTempFilePath({
				  success: res => {
				    this.$refs.uqrcode.save({
				      success: () => {
				        uni.showToast({
				          icon: 'success',
				          title: '保存成功'
				        });
				      }
				    });
				  }
				});	
			}
		}
	}
</script>

<style>

</style>
